//
//  HookAPI.h
//  Staff
//
//  Created by caiyao on 1/13/15.
//
//

#import <Foundation/Foundation.h>
#import "HookCommand.h"
#import "Constants.h"
#import "HookWebViewController.h"

typedef enum {
    HookAPI_EXCUTE_STATUS_READY,
    HookAPI_EXCUTE_STATUS_START,
    HookAPI_EXCUTE_STATUS_DONE
} HookAPIExcuteStatus;

#define COMMAND_EXCUTE_DONE_NOTIFICATION @"HookCommandExcuteDoneNotification"


#define soft_token_success_status_code_0000             @"0000"
#define region_webview_hookAPIFailCall            @"hookAPIFailCall"
#define region_webview_hookAPI_result_true        @"true"
#define region_webview_hookAPI_result_false       @"false"
#define region_webview_statusCall                 @"%@('{\"header\":{\"statusCode\":\"%@\"}}');"



@interface HookAPI: NSObject {

}

@property (nonatomic, strong) HookCommand *command;
@property (nonatomic, assign) UIWebView *webView;
@property (nonatomic, assign) HookWebViewController *hookViewController;
@property (nonatomic, assign) HookAPIExcuteStatus *excuteStatus;

- (id)initWithHookCommand:(HookCommand *)hookCommand webView:(UIWebView *)webView hookViewController:(HookWebViewController *)controller;
- (void)excute;
- (void)excuteNonHookFoundCallback;
- (void)excuteCallBackJSWithParameters:(NSString *)params;

@end
